package com.quanyue.music.user.mapper;

import com.quanyue.music.domain.entity.ShareRecord;
import com.shzisg.mybatis.mapper.auto.AutoMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ShareRecordMapper extends AutoMapper<ShareRecord> {

    ShareRecord findByUserId(@Param("issueUser") String userId);

    @Select("select * from qy_share_record r where valid_count >= 3 ")
    List<ShareRecord> findByValidCount();
}
